<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="有了这个，就不用到处去找重复的了">
  <meta name="keyword" content="hexo, vuejs">
  
    <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
      CentOS6上安装V2ray | 杂记
    
  </title>
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="//cdn.bootcss.com/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/plugins/gitment.css">
<link rel="stylesheet" href="/css/plugins/search.css">
  <script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script src="//cdn.bootcss.com/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>
  <script src="/js/qrious.js"></script>
<script src="/js/gitment.js"></script>
<script src="/js/search.js"></script>
</head>
  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>杂记</span>
    </a>
    <ul class="right-list">
        <li class="list-item">   
          <span class="algolia-autocomplete algolia-autocomplete-right" style="position: relative; display: inline-block; direction: ltr;">
            <input type="text" id="local-search-input" class="search-query st-default-search-input aa-input" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-owns="algolia-autocomplete-listbox-0" dir="auto" style="position: relative; vertical-align: top;">
          </span>
        </li>
      
        <li class="list-item">
          
            <a href="/" class="item-link">Home</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">Tags</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">Archives</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/project/" class="item-link">Projects</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">About</a>
          
        </li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div id="menu-mask" class="menu-mask">
      <ul class="menu-list">
        <li class="menu-item">   
          <span class="algolia-autocomplete algolia-autocomplete-right" style="position: relative; display: inline-block; direction: ltr;">
            <input type="text" id="mobile-search-input" class="search-query st-default-search-input aa-input" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-owns="algolia-autocomplete-listbox-0" dir="auto" style="position: relative; vertical-align: top;">
          </span>
        </li>
        
          <li class="menu-item">
            
              <a href="/" class="menu-link">Home</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">Tags</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">Archives</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/project/" class="menu-link">Projects</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">About</a>
            
          </li>
        
      </ul>
    </div>
  </div>
<div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="输入关键词" />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '博文',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '未定义',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>

<div id="result-wrap" class="ins-search">
    <div id="local-search-result"></div>
</div>

<script type="text/javascript">      
     var search_path = "search.xml";
     if (search_path.length == 0) {
      search_path = "search.xml";
     }
     var path = "/" + search_path;
     searchFunc(path, 'local-search-input', 'local-search-result');
     searchFunc(path, 'mobile-search-input', 'local-search-result');
</script>
</header>

    <div id="article-banner">
  <h2>CentOS6上安装V2ray</h2>
  <p class="post-date">2017-08-19</p>
  <div class="arrow-down">
    <a href="javascript:;"></a>
  </div>
</div>

<main class="app-body">
  <article class="post-article">
    <section class="markdown-content" id="post-content"><p>Centos6下的部署</p>
<p>先说明下，V2Ray提供的一键安装脚本自带守护进程，意思是如果V2Ray如果意外中止，会自动重新启动，这样使用非常方便，但是Centos6下我这种Ctrl CV党实在是不会自己写脚本，采用的是简易运行方式，所以推荐尽量能采用2.1的步骤来安装。</p>
<p>首先我们打开作者的Github项目，找到最新版的V2ray的下载地址</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">https:<span class="regexp">//gi</span>thub.com<span class="regexp">/v2ray/</span>v2ray-core<span class="regexp">/releases</span></div></pre></td></tr></table></figure>
<p>目前最新版是v2.19，我们找到对应的v2ray-linux-64.zip文件，复制链接地址：</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">https:<span class="regexp">//gi</span>thub.com<span class="regexp">/v2ray/</span>v2ray-core<span class="regexp">/releases/</span>download<span class="regexp">/v2.19/</span>v2ray-linux-<span class="number">64</span>.zip</div></pre></td></tr></table></figure>
<p>然后我们Root用户Putty登录服务器，root目录下下载文件，代码如下：</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">wget https:<span class="regexp">//gi</span>thub.com<span class="regexp">/v2ray/</span>v2ray-core<span class="regexp">/releases/</span>download<span class="regexp">/v2.19/</span>v2ray-linux-<span class="number">64</span>.zip</div></pre></td></tr></table></figure>
<p>下载完毕后，我们解压zip文件</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="selector-tag">unzip</span> <span class="selector-tag">v2ray-linux-64</span><span class="selector-class">.zip</span></div></pre></td></tr></table></figure>
<p>目录下会多一个目录名，v2ray-v2.19-linux-64（版本不同目录名有版本号的差别），为了后面操作方便，我们把目录名更名</p>
<figure class="highlight smali"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mv v2ray-v2.19-linux-64 v2ray</div></pre></td></tr></table></figure>
<p>进入目录，并对v2ray文件授权<br><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">cd</span> <span class="string">/root/v2ray</span></div><div class="line"></div><div class="line">chmod +x v2ray</div></pre></td></tr></table></figure></p>
<p>这时候v2ray就能使用了，但是运行v2ray，一旦关闭putty，v2ray就会自动关闭，所以我们需要后台运行，这里采用nohup的方式。<br><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">cd</span> <span class="string">/root/v2ray</span></div><div class="line"></div><div class="line">nohup <span class="string">./v2ray</span> &amp;</div></pre></td></tr></table></figure></p>
<p>停止V2ray服务也很简单<br><figure class="highlight nginx"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="attribute">killall</span> v2ray</div></pre></td></tr></table></figure></p>
<p>编辑rc.local文件，添加开机启动V2ray<br><figure class="highlight applescript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">vi /etc/rc.d/rc.<span class="keyword">local</span></div></pre></td></tr></table></figure></p>
<p>打开后添加两行<br><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">cd</span> <span class="string">/root/v2ray</span></div><div class="line"></div><div class="line">nohup <span class="string">./v2ray</span> &amp;</div></pre></td></tr></table></figure></p>
<p>到这里安装就成功了。下面我们进入下一步，编辑配置文件。</p>
<p>如果使用官网的一键安装脚本无法启动的，可以使用下面这个解决，来自于官网Issues</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#!/bin/sh</span></div><div class="line"><span class="comment">#</span></div><div class="line"><span class="comment"># v2ray        Startup script for v2ray</span></div><div class="line"><span class="comment">#</span></div><div class="line"><span class="comment"># chkconfig: - 24 76</span></div><div class="line"><span class="comment"># processname: v2ray</span></div><div class="line"><span class="comment"># pidfile: /var/run/v2ray.pid</span></div><div class="line"><span class="comment"># description: V2Ray proxy services</span></div><div class="line"><span class="comment">#</span></div><div class="line"></div><div class="line"><span class="comment">### BEGIN INIT INFO</span></div><div class="line"><span class="comment"># Provides:          v2ray</span></div><div class="line"><span class="comment"># Required-Start:    $network $local_fs $remote_fs</span></div><div class="line"><span class="comment"># Required-Stop:     $remote_fs</span></div><div class="line"><span class="comment"># Default-Start:     2 3 4 5</span></div><div class="line"><span class="comment"># Default-Stop:      0 1 6</span></div><div class="line"><span class="comment"># Short-Description: V2Ray proxy services</span></div><div class="line"><span class="comment"># Description:       V2Ray proxy services</span></div><div class="line"><span class="comment">### END INIT INFO</span></div><div class="line"></div><div class="line">DESC=v2ray</div><div class="line">NAME=v2ray</div><div class="line">DAEMON=/usr/bin/v2ray/v2ray</div><div class="line">PIDFILE=/var/run/<span class="variable">$NAME</span>.pid</div><div class="line">LOCKFILE=/var/lock/subsys/<span class="variable">$NAME</span></div><div class="line">SCRIPTNAME=/etc/init.d/<span class="variable">$NAME</span></div><div class="line">RETVAL=0</div><div class="line"></div><div class="line">DAEMON_OPTS=<span class="string">"-config /etc/v2ray/config.json"</span></div><div class="line"></div><div class="line"><span class="comment"># Exit if the package is not installed</span></div><div class="line">[ -x <span class="variable">$DAEMON</span> ] || <span class="built_in">exit</span> 0</div><div class="line"></div><div class="line"><span class="comment"># Read configuration variable file if it is present</span></div><div class="line">[ -r /etc/default/<span class="variable">$NAME</span> ] &amp;&amp; . /etc/default/<span class="variable">$NAME</span></div><div class="line"></div><div class="line"><span class="comment"># Source function library.</span></div><div class="line">. /etc/rc.d/init.d/<span class="built_in">functions</span></div><div class="line"></div><div class="line"><span class="function"><span class="title">start</span></span>() &#123;</div><div class="line">  <span class="built_in">local</span> pids=$(pgrep -f <span class="variable">$DAEMON</span>)</div><div class="line">  <span class="keyword">if</span> [ -n <span class="string">"<span class="variable">$pids</span>"</span> ]; <span class="keyword">then</span></div><div class="line">    <span class="built_in">echo</span> <span class="string">"<span class="variable">$NAME</span> (pid <span class="variable">$pids</span>) is already running"</span></div><div class="line">    RETVAL=0</div><div class="line">    <span class="built_in">return</span> 0</div><div class="line">  <span class="keyword">fi</span></div><div class="line"></div><div class="line">  <span class="built_in">echo</span> -n $<span class="string">"Starting <span class="variable">$NAME</span>: "</span></div><div class="line"></div><div class="line">  mkdir -p /var/<span class="built_in">log</span>/v2ray</div><div class="line">  <span class="variable">$DAEMON</span> <span class="variable">$DAEMON_OPTS</span> 1&gt;/dev/null 2&gt;&amp;1 &amp;</div><div class="line">  <span class="built_in">echo</span> $! &gt; <span class="variable">$PIDFILE</span></div><div class="line"></div><div class="line">  sleep 2</div><div class="line">  pgrep -f <span class="variable">$DAEMON</span> &gt;/dev/null 2&gt;&amp;1</div><div class="line">  RETVAL=$?</div><div class="line">  <span class="keyword">if</span> [ <span class="variable">$RETVAL</span> -eq 0 ]; <span class="keyword">then</span></div><div class="line">    success; <span class="built_in">echo</span></div><div class="line">    touch <span class="variable">$LOCKFILE</span></div><div class="line">  <span class="keyword">else</span></div><div class="line">    failure; <span class="built_in">echo</span></div><div class="line">  <span class="keyword">fi</span></div><div class="line">  <span class="built_in">return</span> <span class="variable">$RETVAL</span></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="title">stop</span></span>() &#123;</div><div class="line">  <span class="built_in">local</span> pids=$(pgrep -f <span class="variable">$DAEMON</span>)</div><div class="line">  <span class="keyword">if</span> [ -z <span class="string">"<span class="variable">$pids</span>"</span> ]; <span class="keyword">then</span></div><div class="line">    <span class="built_in">echo</span> <span class="string">"<span class="variable">$NAME</span> is not running"</span></div><div class="line">    RETVAL=0</div><div class="line">    <span class="built_in">return</span> 0</div><div class="line">  <span class="keyword">fi</span></div><div class="line"></div><div class="line">  <span class="built_in">echo</span> -n $<span class="string">"Stopping <span class="variable">$NAME</span>: "</span></div><div class="line">  killproc -p <span class="variable">$&#123;PIDFILE&#125;</span> <span class="variable">$&#123;NAME&#125;</span></div><div class="line">  RETVAL=$?</div><div class="line">  <span class="built_in">echo</span></div><div class="line">  [ <span class="variable">$RETVAL</span> = 0 ] &amp;&amp; rm -f <span class="variable">$&#123;LOCKFILE&#125;</span> <span class="variable">$&#123;PIDFILE&#125;</span></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="title">reload</span></span>() &#123;</div><div class="line">  <span class="built_in">echo</span> -n $<span class="string">"Reloading <span class="variable">$NAME</span>: "</span></div><div class="line">  killproc -p <span class="variable">$&#123;PIDFILE&#125;</span> <span class="variable">$&#123;NAME&#125;</span> -HUP</div><div class="line">  RETVAL=$?</div><div class="line">  <span class="built_in">echo</span></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="function"><span class="title">rh_status</span></span>() &#123;</div><div class="line">  status -p <span class="variable">$&#123;PIDFILE&#125;</span> <span class="variable">$&#123;DAEMON&#125;</span></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment"># See how we were called.</span></div><div class="line"><span class="keyword">case</span> <span class="string">"<span class="variable">$1</span>"</span> <span class="keyword">in</span></div><div class="line">  start)</div><div class="line">    rh_status &gt;/dev/null 2&gt;&amp;1 &amp;&amp; <span class="built_in">exit</span> 0</div><div class="line">    start</div><div class="line">    ;;</div><div class="line">  stop)</div><div class="line">    stop</div><div class="line">    ;;</div><div class="line">  status)</div><div class="line">    rh_status</div><div class="line">    RETVAL=$?</div><div class="line">    ;;</div><div class="line">  restart)</div><div class="line">    stop</div><div class="line">    start</div><div class="line">    ;;</div><div class="line">  reload)</div><div class="line">    reload</div><div class="line">  ;;</div><div class="line">  *)</div><div class="line">    <span class="built_in">echo</span> <span class="string">"Usage: <span class="variable">$SCRIPTNAME</span> &#123;start|stop|status|reload|restart&#125;"</span> &gt;&amp;2</div><div class="line">    RETVAL=2</div><div class="line">  ;;</div><div class="line"><span class="keyword">esac</span></div><div class="line"><span class="built_in">exit</span> <span class="variable">$RETVAL</span></div></pre></td></tr></table></figure>
<p>Save as <code>/etc/init.d/v2ray</code> and then excute:</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ sudo chmod +x /etc/init.d/v2ray</div><div class="line">$ sudo chkconfig v2ray on</div><div class="line">$ sudo service v2ray start</div></pre></td></tr></table></figure></section>
    
      <div class="tags">
        <span>Tags:</span>
        
  <a href="/tags#v2ray" >
    <span class="tag-code">v2ray</span>
  </a>

      </div>
    
    
<nav id="article-nav">
    
        <a href="/2017/08/20/（转）Hexo添加文章时自动打开编辑器/" id="article-nav-newer" class="article-nav-link-wrap">
            <strong class="article-nav-caption">NEWER</strong>
            <div class="article-nav-title">
                
                    （转）Hexo添加文章时自动打开编辑器
                
            </div>
        </a>
    
    
        <a href="/2017/08/19/V2ray使用TLS/" id="article-nav-older" class="article-nav-link-wrap">
            <strong class="article-nav-caption">OLDER</strong>
            <div class="article-nav-title">V2ray使用TLS</div>
        </a>
    
</nav>


    <div class="money-like">
      <div class="reward-btn">
        赏
        <span class="money-code">
          <span class="wechat-code">
            <div class="code-image"></div>
            <b>使用微信打赏</b>
          </span>
        </span>
      </div>
      <p class="notice">若你觉得我的文章对你有帮助，欢迎点击上方按钮对我打赏</p>
    </div>
    <div class="qrcode">
      <canvas id="share-qrcode"></canvas>
 
      <p class="notice">扫描二维码，分享此文章</p>
    </div>
    
      <!-- UY BEGIN -->
      <div id="uyan_frame"></div>
      <script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=2142069"></script>
      <!-- UY END -->
    
  </article>
</main>

<script>
  (function () {
    var url = 'https://ycg31.oschina.io/2017/08/19/CentOS6上安装V2ray/';
    var banner = ''
    if (banner) {
      $('#article-banner').css({
        'background-image': 'url(' + banner + ')'
      })
    } else {
      $('#article-banner').geopattern(url)
    }
    $('.header').removeClass('fixed-header')

     // error image
    $(".markdown-content img").on('error', function() {
      $(this).attr('src', 'http://file.muyutech.com/error-img.png') 
    })

    // zoom image
    $(".markdown-content img").on('click', function() {
      var src = $(this).attr('src')
      var imageW = $(this).width()
      var imageH = $(this).height()
      
      var zoom = ($(window).width() * 0.95 / imageW).toFixed(2)
      zoom = zoom < 1 ? 1 : zoom
      zoom = zoom > 2 ? 2 : zoom
      var transY = (($(window).height() - imageH) / 2).toFixed(2)

      $('body').append('<div class="image-view-wrap"><div class="image-view-inner"><img src="'+ src +'" /></div></div>')
      $('.image-view-wrap').addClass('wrap-active')
      $('.image-view-wrap img').css({
        'width': `${imageW}`,
        'transform': `translate3d(0, ${transY}px, 0) scale3d(${zoom}, ${zoom}, 1)`
      })
      $('html').css('overflow', 'hidden')

      $('.image-view-wrap').on('click', function() {
        $(this).remove()
        $('html').attr('style', '')
      })
    })

    // qrcode
    var qr = new QRious({
      element: document.getElementById('share-qrcode'),
      value: document.location.href
    });



    // gitment
    var gitmentConfig = "";
    if (gitmentConfig != "undefined") {
      var gitment = new Gitment({
        id: "CentOS6上安装V2ray",
        owner: "",
        repo: "",
        oauth: {
          client_id: "",
          client_secret: ""
        },
        theme: {
          render(state, instance) {
            const container = document.createElement('div')
            container.lang = "en-US"
            container.className = 'gitment-container gitment-root-container'
            container.appendChild(instance.renderHeader(state, instance))
            container.appendChild(instance.renderEditor(state, instance))
            container.appendChild(instance.renderComments(state, instance))
            container.appendChild(instance.renderFooter(state, instance))
            return container;
          }
        }
      })
      gitment.render(document.getElementById('comments'))
    }
  })();
</script>

    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
  <p class="copyright">
    &copy; 2017 | Proudly powered by <a href="https://hexo.io" target="_blank">Hexo</a>
    <br>
    Theme by <a href="https://github.com/yanm1ng">yanm1ng</a> | Mod by <a href="https://github.com/ycg31">ycg31</a>
  </p>
</footer>

<script>
  function async(u, c) {
    var d = document, t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async("//cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async("//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js", function(){
    $('figure pre').each(function(i, block) {
      var figure = $(this).parents('figure');
      if (hasLine == 'false') {
        figure.find('.gutter').hide();
      }
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>
<!-- Baidu Tongji -->

<script src="/js/script.js"></script>
  </body>
</html>